<?php 

include_once './function.php';

$users = include_once './users.php';


// var_dump($users);

foreach ($users as  $user) 
{
	if($user['username']==$_POST['username'])
	{
		if($user['password']==md5($_POST['password'])){
			session_start();
			$_SESSION['username']=$user['username'];
			// $_SESSION['nikename']=$user['nikename'];
			header("Location:./index.php");
			// success('你登录成功','./index.php',3);
			exit;
		}
	}
}

echo "账号或密码错误";
// header("Location:./index.php");
// error('帐号或者密码错误'.'./index.php',3);









 ?>